package com.yuan.aiagent.rag;

import jakarta.annotation.Resource;
import org.springframework.ai.embedding.EmbeddingModel;
import org.springframework.ai.vectorstore.SimpleVectorStore;
import org.springframework.ai.vectorstore.VectorStore;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

import java.util.List;

@Configuration
public class AppVectorConfig {

//    @Resource
//    private AppDocumentLoader appDocumentLoader;
//    @Resource
//    private MyDocumentEnricher myDocumentEnricher;
//    @Bean
//    @Primary
//    VectorStore appVectorStore(EmbeddingModel embeddingModel) {
//        SimpleVectorStore vectorStore = SimpleVectorStore.builder(embeddingModel).build();
//        // 加载恋爱知识库文档
//        List markdowns = appDocumentLoader.loadMarkdowns();
//        List enrichedDocuments = myDocumentEnricher.enrichDocumentsByKeyword(markdowns);
//        vectorStore.add(enrichedDocuments);
//        return vectorStore;
//    }
}
